<script lang="ts">
export default {
  name: "xt-table-column",
};
</script>

<script setup lang="ts">
import { ElTableColumn } from "element-plus";
import type Typings from "../../../typings";

interface Props extends /* @vue-ignore */ Typings.Table.tableColumnInstance {
  align?: "left" | "center" | "right";
  showOverflowTooltip?: boolean;
}

withDefaults(defineProps<Props>(), {
  align: "center",
  showOverflowTooltip: true,
});
</script>

<template>
  <el-table-column
    class="xt-table-column"
    :showOverflowTooltip="showOverflowTooltip"
    :align="align"
  >
    <template v-for="(_value, name) in $slots" #[name]="scope" :key="name">
      <slot :name="name" v-bind="scope || {}"></slot>
    </template>
  </el-table-column>
</template>

<style lang="scss">
@use "../../../scss/xt-table-column.scss";
</style>
